﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Configuration;

namespace Musicman.Utilities.Configuration.Cron
{
    public class CronJobConfigurationElement : ConfigurationElement
    {
        [ConfigurationProperty("startdate", IsRequired = true)]
        public DateTime StartDate
        {
            get { return (DateTime)this["startdate"]; }
            set { this["startdate"] = value; }
        }

        [ConfigurationProperty("days", IsRequired = true, DefaultValue = 0)]
        public int Days
        {
            get { return (int)this["days"]; }
            set { this["days"] = value; }
        }

        [ConfigurationProperty("hours", IsRequired = true, DefaultValue = 0)]
        public int Hours
        {
            get { return (int)this["hours"]; }
            set { this["hours"] = value; }
        }

        [ConfigurationProperty("minutes", IsRequired = true, DefaultValue = 0)]
        public int Minutes
        {
            get { return (int)this["minutes"]; }
            set { this["minutes"] = value; }
        }

        [ConfigurationProperty("loopminutes", IsRequired = true, DefaultValue = 5)]
        public int LoopMinutes
        {
            get { return (int)this["loopminutes"]; }
            set { this["loopminutes"] = value; }
        }
    }
}
